package com.pq.dao.order;

import com.pq.pojo.order.OrderTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderTableDao {
    int saveOrder(Map<String, Object> map);

    int saveOrderTable(Integer orderId, List<Long> orderCartIds);

    OrderTable findOrderByOrderId(Integer orderId);

    int updateOrderByOrderId(Integer siteId, Integer userId, Integer orderId);

    int saveOrderPay(Integer orderId);

    @Select("SELECT product_id AS productId FROM order_table WHERE order_id=#{orderId}")
    OrderTable findByOrderId(Integer orderId);
}
